import App from './App'
import store from './store'

//本地存储
import cookie from '@/utils/auth.js'
Vue.prototype.Cookie = cookie

import Ws from '@/utils/websocket.js'
Vue.prototype.Ws = Ws;

// #ifdef H5
// 提交前需要注释  本地调试使用
// const vconsole = require('vconsole')
// Vue.prototype.$vconsole = new vconsole() // 使用vconsole
// #endif

import * as filters from '@/filters/index.js'
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key])
})

import * as sysTools from "@/js_sdk/index.js" // 权限工具引入
import * as tools from '@/utils/tools.js'
import digit from '@/libs/fn/digit.js'
import fn from '@/libs/fn/index.js'
const tool = {
	...tools,
	...digit,
	...fn,
	...sysTools,
}
for (let key in tool) {
	Vue.prototype[key] = tool[key]
}

// import music from '@/utils/music.js'
// Vue.prototype.$music =music 

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		store,
		app
	}
}
// #endif